// 1. 引入fs
let fs = require('fs');

const ws = fs.createWriteStream('./data.txt');

ws.write('世间一切有为法，皆如梦幻泡影');

ws.write('如梦亦如电，应作如是观');

ws.write('!!!');

ws.close();